import 'dart:convert';

AssessmentDto assessmentDtoFromJson(String str) =>
    AssessmentDto.fromJson(json.decode(str));

String assessmentDtoToJson(AssessmentDto data) => json.encode(data.toJson());

class AssessmentDto {
  AssessmentDto({
    this.classId,
    this.type,
    this.questionGroupId,
    this.instruction,
    this.kind,
    this.name,
    this.textType,
    this.audioType,
    this.endTime,
    this.startTime,
    this.studentUserNames,
    this.id,
  });

  String? classId;
  String? type;
  String? questionGroupId;
  String? instruction;
  String? name;
  String? textType;
  String? kind;
  String? audioType;
  int? endTime;
  int? startTime;
  List<String>? studentUserNames;
  String? id;

  factory AssessmentDto.fromJson(Map<String, dynamic> json) => AssessmentDto(
        classId: json["classId"],
        id: json["id"],
        type: json["type"],
        kind: json["kind"],
        questionGroupId: json["questionGroupId"],
        instruction: json["instruction"],
        name: json["name"],
        textType: json["textType"],
        audioType: json["audioType"],
        endTime: json["endTime"],
        startTime: json["startTime"],
        studentUserNames: json["studentUserNames"] != null
            ? List<String>.from(json["studentUserNames"].map((x) => x))
            : null,
      );

  Map<String, dynamic> toJson() => {
        "classId": classId,
        "id": id,
        "type": type,
        "kind": kind,
        "questionGroupId": questionGroupId,
        "instruction": instruction,
        "name": name,
        "textType": textType,
        "audioType": audioType,
        "endTime": endTime,
        "startTime": startTime,
        "studentUserNames": studentUserNames != null
            ? List<dynamic>.from(studentUserNames!.map((x) => x))
            : null,
      };
}
